[airflow] Update oudated AIR301, AIR302 rules#17123
Merged
ntBre merged 15 commits intoastral-sh:mainfrom Apr 7, 2025
Merged
Conversation
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| AIR302 | 8 | 6 | 2 | 0 | 0 |
2c0eaf2 to
117f1ae
Compare
Closed
6 tasks
117f1ae to
b7be1f4
Compare
Lee-W
added a commit
to astronomer/airflow
that referenced
this pull request
Apr 2, 2025
914825c to
37057cd
Compare
Lee-W
commented
Apr 3, 2025
Contributor
Author
|
@ntBre Would be nice if we can get a quick review on this one 🙂 Thanks 🙏 |
Contributor
|
Will do! Feel free to ping me or request my review on any of these. There's a chance I could have missed them before taking over from Dhruv. I assigned myself to a few last night :) |
ntBre
approved these changes
Apr 4, 2025
Contributor
ntBre
left a comment
There was a problem hiding this comment.
Thanks! Just a few nits/questions
crates/ruff_linter/src/rules/airflow/rules/moved_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/airflow/rules/moved_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
…irflow 3 change * ``airflow.operators.bash.BashOperator`` → ``airflow.providers.standard.operators.bash.BashOperator`` * ``airflow.operators.EmptyOperator`` → ``airflow.providers.standard.operators.empty.EmptyOperator``
* ``airflow.operators.email_operator.EmailOperator`` → ``airflow.providers.smtp.operators.smtp.EmailOperator`` * ``airflow.operators.email.EmailOperator`` → ``airflow.providers.smtp.operators.smtp.EmailOperator``
…be recategorized as AIR302 due to rule change * airflow.sensors.external_task_sensor.ExternalTaskMarker * airflow.sensors.external_task_sensor.ExternalTaskSensor * airflow.sensors.external_task_sensor.ExternalTaskSensorLink * airflow.sensors.time_delta_sensor.TimeDeltaSensor * airflow.operators.dagrun_operator.TriggerDagRunLink * airflow.operators.dagrun_operator.TriggerDagRunOperator * airflow.operators.python_operator.BranchPythonOperator * airflow.operators.python_operator.PythonOperator * airflow.operators.python_operator.PythonVirtualenvOperator * airflow.operators.python_operator.ShortCircuitOperator * airflow.operators.latest_only_operator.LatestOnlyOperator * airflow.operators.bash_operator.BashOperator * airflow.operators.branch_operator.BaseBranchOperator
…be recategorized as AIR302 due to rule change * airflow.sensors.date_time_sensor.DateTimeSensor
* airflow.sensors.external_task_sensor.ExternalTaskMarker → airflow.providers.standard.sensors.external_task.ExternalTaskMarker * airflow.sensors.external_task_sensor.ExternalTaskSensor → airflow.providers.standard.sensors.external_task.ExternalTaskSensor * airflow.sensors.external_task_sensor.ExternalTaskSensorLink → airflow.providers.standard.sensors.external_task.ExternalTaskSensorLink * airflow.sensors.time_delta_sensor.TimeDeltaSensor → airflow.providers.standard.sensors.time_delta.TimeDeltaSensor * airflow.operators.dagrun_operator.TriggerDagRunLink → airflow.providers.standard.operators.trigger_dagrun.TriggerDagRunLink * airflow.operators.dagrun_operator.TriggerDagRunOperator → airflow.providers.standard.operators.trigger_dagrun.TriggerDagRunOperator * airflow.operators.python_operator.BranchPythonOperator → airflow.providers.standard.operators.python.BranchPythonOperator * airflow.operators.python_operator.PythonOperator → airflow.providers.standard.operators.python.PythonOperator * airflow.operators.python_operator.PythonVirtualenvOperator → airflow.providers.standard.operators.python.PythonVirtualenvOperator * airflow.operators.python_operator.ShortCircuitOperator → airflow.providers.standard.operators.python.ShortCircuitOperator * airflow.operators.latest_only_operator.LatestOnlyOperator → airflow.providers.standard.operators.latest_only.LatestOnlyOperator * airflow.sensors.date_time_sensor.DateTimeSensor → airflow.providers.standard.sensors.DateTimeSensor
37057cd to
eaa3656
Compare
Contributor
Author
|
I think this one is ready again. Thanks! |
airflow] Update oudated AIR301, AIR302 rules
dcreager
added a commit
that referenced
this pull request
Apr 7, 2025
* main: (42 commits) [playground] New default program (#17277) [red-knot] Add `--python-platform` CLI option (#17284) [red-knot] Allow ellipsis default params in stub functions (#17243) [red-knot] Fix stale syntax errors in playground (#17280) Update Rust crate clap to v4.5.35 (#17273) Fix RUF100 to detect unused file-level noqa directives with specific codes (#17042) (#17061) [ci] Fix pattern for code changes (#17275) [`airflow`] Update oudated `AIR301`, `AIR302` rules (#17123) [docs] fix formatting of "See Style Guide" link (#17272) [red-knot] Support stub packages (#17204) ruff_annotate_snippets: address unused code warnings [red-knot] Add a couple more tests for `*` imports (#17270) [red-knot] Add 'Format document' to playground (#17217) Update actions/setup-node action to v4.3.0 (#17259) Update actions/upload-artifact action to v4.6.2 (#17261) Update actions/download-artifact action to v4.2.1 (#17258) Update actions/setup-python action to v5.5.0 (#17260) Update actions/cache action to v4.2.3 (#17256) Update Swatinem/rust-cache action to v2.7.8 (#17255) Update actions/checkout action to v4.2.2 (#17257) ...
Lee-W
added a commit
to astronomer/airflow
that referenced
this pull request
Apr 8, 2025
Lee-W
added a commit
to apache/airflow
that referenced
this pull request
Apr 8, 2025
dcreager
added a commit
that referenced
this pull request
Apr 8, 2025
* main: (222 commits) [playground] New default program (#17277) [red-knot] Add `--python-platform` CLI option (#17284) [red-knot] Allow ellipsis default params in stub functions (#17243) [red-knot] Fix stale syntax errors in playground (#17280) Update Rust crate clap to v4.5.35 (#17273) Fix RUF100 to detect unused file-level noqa directives with specific codes (#17042) (#17061) [ci] Fix pattern for code changes (#17275) [`airflow`] Update oudated `AIR301`, `AIR302` rules (#17123) [docs] fix formatting of "See Style Guide" link (#17272) [red-knot] Support stub packages (#17204) ruff_annotate_snippets: address unused code warnings [red-knot] Add a couple more tests for `*` imports (#17270) [red-knot] Add 'Format document' to playground (#17217) Update actions/setup-node action to v4.3.0 (#17259) Update actions/upload-artifact action to v4.6.2 (#17261) Update actions/download-artifact action to v4.2.1 (#17258) Update actions/setup-python action to v5.5.0 (#17260) Update actions/cache action to v4.2.3 (#17256) Update Swatinem/rust-cache action to v2.7.8 (#17255) Update actions/checkout action to v4.2.2 (#17257) ...
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
May 29, 2025
…#17123 (#48634) GitOrigin-RevId: bcddef3ca9aad6aa0efe2f2f9f8149733aa5784b
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Sep 24, 2025
…#17123 (#48634) GitOrigin-RevId: bcddef3ca9aad6aa0efe2f2f9f8149733aa5784b
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Oct 22, 2025
…#17123 (#48634) GitOrigin-RevId: bcddef3ca9aad6aa0efe2f2f9f8149733aa5784b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Some of the migration rules has been changed during Airflow 3 development. The following are new AIR302 rules. Corresponding AIR301 has also been removed.
closes: #17103
Test Plan
The test fixture has been updated and checked after each change and later reorganized in the latest commit